1. Field of the Invention
The invention generally relates to accessing memory in a computer system.
2. Description of the Related Art
Many modern electronic devices such as cell phones, PDAs, portable music players, appliances, and so on typically incorporate an embedded computer system. An embedded computer system typically contains a computer processor (referred to as a host), non-volatile memory (such as a flash memory and/or ROM memory), and volatile memory such as a dynamic random access memory (DRAM). The host may include a central processing unit (CPU), digital signal processor (DSP), microcontroller unit (MCU) or direct memory access (DMA) data transmission device. The embedded system may also include a nonvolatile memory controller which may be used to control and/or access the nonvolatile memory.
In the embedded system, the volatile memory may typically be accessed more quickly than non-volatile memory. Thus, for example, code executed by the host may be stored in the volatile memory and accessed from the volatile memory by the host. However, because volatile memory typically requires a power source to maintain data stored therein, when the embedded system is powered down, the volatile memory is typically erased. Accordingly, the nonvolatile memory, which typically does not require a power source to maintain stored data, may be used to store the code executed by the host while the embedded system is powered down. When the embedded system is powered up (e.g., when the embedded system enters a reset state), the code used by the host system may be loaded into the volatile memory and executed from the volatile memory by the host. The process of loading code stored in the non-volatile memory into the volatile memory and executing the code from the volatile memory may be referred to as code shadowing.
To maintain flexibility in accessing data in the embedded system, there may be a desire to transfer data between the host, volatile memory, and nonvolatile memory in a variety of ways. For example, there may be a desire to perform data transfers between the volatile memory and the host, the nonvolatile memory and the host, and the volatile memory and the nonvolatile memory. While maintaining flexibility in accessing data in the embedded system, there may also be a desire to reduce the cost and complexity of the interface between the host and the components of the memory system.
Accordingly, what is needed is an improved system and method for accessing memory in an embedded system.